<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
%>
<%@page import="zozopo.operations.comm.*" %>
<%@page import="zozopo.manual.operations.*" %>
<%@page import="zozopo.user.operations.*" %>
<%@page import="zozopo.operations.business.*" %>
<%@page import="zozopo.database.*" %>
<%@page import="java.sql.*" %>
<%@taglib prefix="s" uri="/struts-tags"%>

<%
    BusiDatabaseManager databaseConnection = new BusiDatabaseManager();
	Connection conn = databaseConnection.getConnection();
    DictionaryOS dictionaryOS = new DictionaryOS(conn);
    ReleaseOS releaseOS = new ReleaseOS(conn);
    BrandlogoOS brandlogoOS = new BrandlogoOS(conn);
    ReplyOS replyOS = new ReplyOS(conn);
    AdOS adOS = new AdOS(conn);
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	
	 <link rel="stylesheet" href="<%=basePath %>/css/style.css" type="text/css" />
  
  <!--[if lt IE 7]>
	<link rel="stylesheet" href="css/MenuMatic-ie6.css" type="text/css" media="screen" charset="utf-8" />
    <link href="css/style-ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->
  </head> 
   

  <body>
    <div id="sidebars">			

					<div class="sidebar left">
				<div class="sidebar_box">

					<div class="box"><div class="box_outer"><div class="box_inner"><div class="box_bottom_right"><div class="box_bottom_left">

						<div class="box_content_ads">	
<p style="font-size:10px;color:#aaaaaa;margin-top:-10px;">旗下品牌</p>
							<p>

<a href="#" target="_blank"><img border="0" src="<%=basePath %>/firehead.jpg" width="125" height="125" /></a>
<!-- <a href="http://themeforest.net?ref=sada"><img src="http://www.design3edge.com/wp-content/uploads/advertise/themeforest_125x125_128.jpg" width="125" height="125" alt="Sponsor" /></a> -->
</p>

						</div>

					</div></div></div></div></div>

				</div>


				<div class="sidebar_box"> <div class="box"><div class="box_outer"><div class="box_inner"><div class="box_bottom_right"><div class="box_bottom_left">
 <div class="box_content"><h3>网店主题</h3>
<!-- Begin PayPal Donations by http://wpstorm.net/ -->
<p align="center">

<a href="area/lable.jsp" ><img alt="ZOZOPO售后标签" src="<%=basePath %>/ad/lableSmall.png" /></a> 
<br/><a href="area/razer.jsp" ><img alt="雷蛇 专区 - ZOZOPO" src="<%=basePath %>/ad/razerarea.png" /></a>
<br/><a href="<%=basePath %>/store.jsp" ><img alt="正品网店推荐" src="<%=basePath %>/ad/goodsmini.png" /></a>
</p>
<div class="paypal-donations">


</div>
<!-- End PayPal Donations -->
</div>
 </div></div></div></div></div> </div> 
 
 <div class="sidebar_box"> <div class="box"><div class="box_outer"><div class="box_inner"><div class="box_bottom_right"><div class="box_bottom_left">
 <div class="box_content"> <h3>回复信息</h3>  
 
 
<%

	List<ReplyTB> newReplyList = replyOS.selectNewReply(0,20);
	for(ReplyTB reply:newReplyList){
		
	String content = zozopo.comm.Validate.htmlLabelFilter(reply.getReplys_context());
	content = zozopo.comm.Validate.htmlFilter(content);
	
	if(content.length() >=20 ){
		content = content.substring(0, 20) + "...";
	}
%>
	<div class="separator"></div>
 <div class="box_posts"> 
 <img src="<%=basePath %>/icons/avatar.jpg" width="30" height="30" alt="WP Themes" class="avatar" />
 	<a href="<%=basePath %>/manual/view.action?id=<%=reply.getReplys_release_id() %>"><%=reply.getReplys_name() %></a>
 <br /> <%=content %> </div>
 

<%} %>
 </div>
 </div></div></div></div></div> 
 
 </div> 


				
				

			</div>			

					<div class="sidebar right">

              			

				 <!-- Wordpress Popular Posts Plugin v2.1.4 [W] [all] [regular] -->
<div class="sidebar_box">
 <div class="box"><div class="box_outer"><div class="box_inner"><div class="box_bottom_right"><div class="box_bottom_left">
 <div class="box_content">
 
 
<h3>热门品牌分类 :</h3><ul>
	
	
	
		<%
					Map dictionaryLableMap = dictionaryOS.getDictionaryLableMap();
					Iterator iter = dictionaryLableMap.entrySet().iterator();
					while(iter.hasNext()){
						Map.Entry entry = (Map.Entry)iter.next();
						DictionaryTB dictionary	= (DictionaryTB)entry.getValue();
						
			
			     		List<String> brandListforDic = releaseOS.selectBrandHitByKind(dictionary.getDictionary_code(),-100,0,16); 
			     		
						StringBuffer strBuff = new StringBuffer();
						for(String brand:brandListforDic){
							strBuff.append(brand);
							strBuff.append(", ");
						}
						strBuff.append(" ...");
			%>
            			
            			
		           <li> <A title="<%=strBuff.toString() %>" 
		            href="<%=basePath %>/lable.action?lable=<%=dictionary.getDictionary_code() %>"><%=dictionary.getDictionary_value() %></A>  
		           </li>
            	
            <%
				}
			%>

 </ul>
</div>
 </div></div></div></div></div> </div>
<!-- End Wordpress Popular Posts Plugin v2.1.4 -->
 <div class="sidebar_box"> <div class="box"><div class="box_outer"><div class="box_inner"><div class="box_bottom_right"><div class="box_bottom_left">
 <div class="box_content"> <h3>推荐店铺</h3> <ul> 	
	<%
		List<AdTB> adList = adOS.selectAdByLocation("SIDE"); 
		for(AdTB ad:adList){
	%>
	<li><a href='<%=basePath %>/ad.action?id=<%=ad.getId_ad()%>' target="_blank"><%=ad.getName_ad() %></a></li>
	
	
	<%} %>
 </ul> </div> </div></div></div></div></div> </div> 
<!-- Subscribe Starts Here -->
<div class="sidebar_box">

					<div class="box"><div class="box_outer"><div class="box_inner"><div class="box_bottom_right"><div class="box_bottom_left">

					<div class="box_content"><img style="margin-right:3px;" align="left" src="<%=basePath %>/icons/email_subscription.png" border="0" title="Subscription" alt="Subscription" /> <h3 style="padding-top:1px;padding-bottom:0px;">加入小站?</h3>
      			<%
	
					//String uri = request.getServletPath();
					//String path = request.getRequestURI();
					
					
					
				
					UserTB user = (UserTB) session.getAttribute("userInfo");
					//System.out.println(user.getUser_email());
				 	if(user == null){
				 		
				%>
				
					
					
					<A href="<%=basePath %>/user/login.jsp" >登录</A> 
					  <A href="<%=basePath %>/user/regist.jsp">注册</A> 
		
				<%
				 	}else{
				%>
					 
					<A 
					href="<%=basePath %>/user/userinfo.action?id=<%=user.getId_user()%>"><%=user.getName_user() %></A> 
					<br></A> 
					<br> <A href="<%=basePath %>/user/maloginout.action">退出</A> 
				
					
				<%
				 	}
				%>
					</div>

					</div></div></div></div></div>

				</div>
<!-- Subscribe Ends Here -->


<!-- Poll Starts Here --> 

<div class="sidebar_box">

<div class="box"><div class="box_outer"><div class="box_inner"><div class="box_bottom_right"><div class="box_bottom_left">

<div  class="box_content"><img style="margin-right:3px;" align="left" src="http://www.zozopo.com/icons/poll-yellow.png" border="0" title="Poll" alt="Poll" /> <h3 style="padding-top:1px;">投票</h3>


    <div id="polls-7" class="wp-polls">
	<form id="polls_form_7" class="wp-polls-form" action="/" method="post">
		<p style="display: none;"><input type="hidden" name="poll_id" value="7" /></p>
		<p style="margin-top:-14px;margin-bottom:5px;text-align: left;"><strong>你觉得网站的新模板如何?</strong></p><div id="polls-7-ans" class="wp-polls-ans"><ul class="wp-polls-ul">
		<li style="margin:3px 0px 3px 13px;padding:2px 0px 3px 0px;"><input type="radio" id="poll-answer-27" name="poll_7" value="27" /> <label for="poll-answer-27">1 - 不行啊!</label></li>
		<li style="margin:3px 0px 3px 13px;padding:2px 0px 3px 0px;"><input type="radio" id="poll-answer-28" name="poll_7" value="28" /> <label for="poll-answer-28">2 - 不行</label></li>
		<li style="margin:3px 0px 3px 13px;padding:2px 0px 3px 0px;"><input type="radio" id="poll-answer-29" name="poll_7" value="29" /> <label for="poll-answer-29">3 - 一般</label></li>
		<li style="margin:3px 0px 3px 13px;padding:2px 0px 3px 0px;"><input type="radio" id="poll-answer-30" name="poll_7" value="30" /> <label for="poll-answer-30">4 - 可以</label></li>
		<li style="margin:3px 0px 3px 13px;padding:2px 0px 3px 0px;"><input type="radio" id="poll-answer-31" name="poll_7" value="31" /> <label for="poll-answer-31">5 - 不错t</label></li>
		</ul><p>&nbsp;</p><p  style="clear:both;"><input type="button" name="vote" value="投票" class="Buttons" onclick="poll_vote(7);" /> &nbsp;&nbsp;&nbsp;<a style="padding:2px 2px 1px 3px;" href="#ViewPollResults" onclick="poll_result(7); return false;" class="Buttons"  title="View Results Of This Poll">查看结果</a></p></div>
	</form>
</div>


</div>

 </div></div></div></div></div> </div>

<!-- Poll Ends Here -->

             
<!-- AD 180 x 100 Starts Here -->
<div class="sidebar_box">

					<div class="box"><div class="box_outer"><div class="box_inner"><div class="box_bottom_right"><div class="box_bottom_left">

					<div class="ads180x100">
           <!-- BuySellAds.com Zone Code -->
<div id="bsap_1243772" class="bsarocks bsap_a205794bbdfd717c36a8b8106016ccb1"></div>
<!-- END BuySellAds.com Zone Code -->					</div>

					</div></div></div></div></div>

				</div>
<!-- AD 180 x 100 Ends Here -->
                

                <!-- Tags Starts Here --> 

                 <div class="sidebar_box">

 <div class="box"><div class="box_outer"><div class="box_inner"><div class="box_bottom_right"><div class="box_bottom_left">

 <div class="box_content"><img style="margin-right:3px;" align="left" src="<%=basePath %>/icons/tag_green.gif" border="0" title="Tags" alt="Tags" /> <h3 style="padding-top:1px;">品牌标签</h3>


<%
	Map<String,Integer> tagMap = releaseOS.selectBrandTag(0,80);
	for(Map.Entry<String, Integer> m:tagMap.entrySet()){
		
		
%>

<a href='<%=basePath %>/brandforhome.action?brand=<%=java.net.URLEncoder.encode(m.getKey(), "utf-8").replace("%","%25") %>' class='tag-link-31' title='<%=m.getValue()%> topics' style='font-size: <%=m.getValue()+10  %>pt;'><%=m.getKey() %></a>
<% }%>
</div>

 </div></div></div></div></div> </div>

				

			</div>

             <!-- Tags Ends Here --> 		

		</div>	
  </body>
</html>
<%
   	 databaseConnection.releaseConnection(conn); 
    %>